/**
 * This software implements a CAT-1 LTE baseband.
 *
 * Copyright (C) 2015  Optimum Semiconductor Technologies, Inc. info@optimumsemi.com
 *
 * rf_setup_api.h --
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.

 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 */

#ifndef RF_SETUP_API_H_
#define RF_SETUP_API_H_

void Lte_rf_setup(int channel);
void Lte_rf_close();

/* RF Receiver ON */
void Lte_RfReceiverOn(int channel);
/* RF Receiver OFF */
void Lte_RfReceiverOff(int channel);
/* RF Transmitter ON */
void Lte_RfTransmitterOn(int channel);
/* RF Transmitter OFF */
void Lte_RfTransmitterOff(int channel);

/* RF Standby */
void Lte_RfStandby(int channel);

/* RF Gain configurations */
int Lte_increase_rx_agc_gain(int channel, int step);
int Lte_reduce_rx_agc_gain(int channel, int step);
void Lte_rx_set_gain(int channel,  int lna_gain, int vga_gain);
int Lte_rx_get_current_gain(int channel);
void Lte_rf_setTxVgaGain(int channel, int gain);

/* RF Frquency configuration */
void Lte_rx_set_freq(int bandscan_freq, int channel);
void Lte_correct_frequency(int channel);

/* RF LPF Bandwidth configuration */
void Lte_rx_set_bandwidth(int bandwidth, int channel);

void Lte_rf_rx_led_on();
void Lte_rf_tx_led_on();
void Lte_rf_rx_led_off();
void Lte_rf_tx_led_off();

/* Power vs Gain Constant */
#define MAXIM_RF_MINUS97DBM_GAIN		(40)

#endif /* RF_SETUP_API_H_ */
